
/* 主内容区样式 */
.main-content {
  padding: 24px;
  background-color: #f5f7fa;
  overflow-y: auto;
  min-height: calc(100vh - 60px);
}
.main-content::-webkit-scrollbar {
  display: none;
}

.main-content {
  -ms-overflow-style: none;  
  scrollbar-width: none; 
}

/* 头部样式 */
.header-container {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eaecef;
}

.page-title {
  margin: 0;
  font-size: 20px;
  color: #1f2d3d;
  font-weight: 600;
}

.back-button {
  margin-right: 16px;
  transition: all 0.2s;
}

.back-button:hover {
  transform: translateX(-3px);
}

/* 卡片容器样式 */
.profile-card-container {
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  border: none;
  transition: box-shadow 0.3s ease;
}

.profile-card-container:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* 查看模式样式 */
.view-mode {
  padding: 30px;
}

/* 头像区域样式 */
.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px dashed #e5e6eb;
}

.avatar-wrapper {
  position: relative;
  margin-right: 28px;
}

.profile-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.avatar-action {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(10px);
}

.avatar-wrapper:hover .avatar-action {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.profile-basic {
  flex: 1;
}

/* 头像区域样式 */
.profile-name {
  margin: 0 0 12px 0;
  font-size: 24px;
  color: #1f2d3d;
  font-weight: 600;
}

.profile-role {
  margin: 0;
}

.role-tag {
  display: inline-block;
  padding: 5px 14px;
  background-color: #e6f7ff;
  color: #1890ff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.role-tag:hover {
  background-color: #d6efff;
  transform: translateY(-1px);
}

/* 详情信息样式 */
.profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.detail-item {
  margin-bottom: 0;
}

.detail-content {
  background-color: #fafbfc;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.3s;
}

.detail-content:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.detail-label {
  display: block;
  margin-bottom: 8px;
  color: #606266;
  font-size: 14px;
  font-weight: 500;
}

.detail-value-wrapper {
  display: flex;
  align-items: center;
}

.detail-value {
  flex: 1;
  padding: 8px 0;
  color: #303133;
  font-size: 16px;
  min-height: 36px;
  word-break: break-all; /* 防止长内容溢出 */
}

.edit-tag {
  color: #909399;
  transition: all 0.2s;
  opacity: 0.7;
  margin-left: 8px;
}

.edit-tag:hover {
  color: #409eff;
  opacity: 1;
  transform: scale(1.1);
}

/* 操作按钮样式 */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.action-buttons button {
  min-width: 140px;
  height: 40px;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.action-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-buttons button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 编辑模式样式 */
.edit-mode {
  padding: 30px;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.edit-title {
  margin: 0;
  font-size: 20px;
  color: #1f2d3d;
  font-weight: 600;
}

.close-edit {
  color: #909399;
  transition: all 0.2s;
}

.close-edit:hover {
  color: #606266;
  transform: rotate(90deg);
}

.avatar-upload-container {
  display: flex;
  align-items: center;
}

.preview-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 24px;
  border: 3px solid #e4e7ed;
  transition: all 0.3s;
}

.preview-avatar:hover {
  border-color: #409eff;
  transform: scale(1.05);
}

.avatar-uploader .el-button {
  transition: all 0.3s;
}

.avatar-uploader .el-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px dashed #e5e6eb;
  margin-top: 16px;
}

.form-actions button {
  min-width: 120px;
  height: 40px;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.3s;
}

.form-actions button:hover {
  transform: translateY(-2px);
}

.form-actions button:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .detail-item {
    flex: 1 1 calc(33.333% - 16px); /* 中等屏幕每行3个 */
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }

  .profile-card-container {
    margin: 0;
  }

  .view-mode, .edit-mode {
    padding: 20px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .avatar-wrapper {
    margin-right: 0;
    margin-bottom: 24px;
  }

   .profile-details {
    grid-template-columns: 1fr; /* 小屏幕时改为单列 */
  }

  .detail-item {
    width: 100%;
    min-width: auto;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .action-buttons button {
    min-width: 100%;
  }

  .edit-form .el-form-item__label {
    text-align: left;
    padding: 0 0 8px 0;
  }
}
